<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bilibili悬停效果</title>
</head>
<body>
    <div class="con">
        <a href="https://www.bilibili.com/video/BV1yK421v74K/?spm_id_from=333.337.search-card.all.click"target="_blank"
        class="item">
            <img src="./牢大2.jpg"alt=""></a>
            <a href="https://www.bilibili.com/video/BV1yK421v74K/?spm_id_from=333.337.search-card.all.click"target="_blank"
            class="play-btn"></a>
            <a href="https://www.bilibili.com/video/BV1yK421v74K/?spm_id_from=333.337.search-card.all.click"target="_blank"
            class="mask">
              <h1>Man</h1>
              <p>励志一生却被小人诋毁</p>
        </a>
    </div>
    <style>
        body{
            background-image: url(./牢大.jpg);
            background-size: 100%;
            opacity: 0.7;
        }
        
        div{
            margin: 0 auto;
            text-align: center;
        }
        a{
            text-decoration: none;
            display: block;
        }
        .con{
            position: relative;
            width: 400px;
            margin-left: 700px;
            margin-top: 300px;
        }
        .con .item{
            width: 100%;
            height: 100%;
        }
        .con .item img{
            width: 100%;
        }
        .play-btn{
            opacity: 0;
            position: absolute;
            width: 56px;
            height: 56px;
            right: 10%;
            bottom: 10%;
            background: url(./播放.png) no-repeat center center;
            transition: opacity .5s ease-in-out .5s;
        }
        .con:hover .play-btn{
            opacity: 1;
        }
        .mask{ 
            background-color:rgba(126, 160, 113, 0.6);
            width: 100%;
            height: 0;
            position: absolute;
            bottom: 0;
            transition: height .5s ease-in-out .5s ;
            overflow: hidden;
        }
        .con:hover .mask{
            height: 100%;
        }
        </style>
</body>
</html>